package com.schoolcloud.system.service;


import com.schoolcloud.system.dto.SysPermissionSearchDTO;
import com.schoolcloud.system.entity.SysPermission;
import com.schoolcloud.system.vo.SysPermissionTreeVO;
import com.schoolcloud.system.vo.SysUserInfoVO;

import java.util.List;

/**
 * @author hongmizfb
 * @description 针对表【sys_permission】的数据库操作Service
 * @createDate 2024-10-19 23:02:28
 */
public interface SysPermissionService {

    void addPermission(SysPermission permission);

    List<SysPermissionTreeVO> convertedPermissionToTreeList(List<SysPermission> list);

    List<SysPermission> list();

    List<SysPermission> list(SysPermission sysPermission);

    /**
     * 获取用户的权限值
     *
     * @param userId
     * @return {@link List}<{@link String}>
     */
    List<String> getUserPermissionsCode(String userId);

    /**获取用户的权限信息
     * @param user
     * @return {@link SysUserInfoVO}
     */
    SysUserInfoVO getUserPermissions(String user);

    List<SysPermission> getPermissionFolder();

    void modifyPermission(SysPermission permission);

    void delSysPermissionById(String permissionId);

    List<SysPermission> getPermissionsByRoleId(String roleId);

    SysPermission getPermissionById(String permissionId);
}
